#!/usr/bin/python3
# -*- coding: utf-8 -*-


import rospy
from tf.msg import tfMessage
import time
from sensor_msgs.msg import Imu

pub = rospy.Publisher('/imu', Imu, queue_size=1)
val = Imu()

def callback(data):
  val = data
  val.header.frame_id = "imu_link"
  # print(data)
  pub.publish(val)

def main():
  rospy.init_node('change_bag_imu')
  rospy.Subscriber('/imu/data', Imu, callback)
  rospy.spin()

if __name__ == '__main__':
  main()
